home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
editors
/
mjovesrc.zoo
/
makefile
< prev
next >
Wrap
Makefile
|
1992-04-04
|
17KB
|
405 lines
###########################################################################
# This program is Copyright (C) 1986, 1987, 1988 by Jonathan Payne. JOVE #
# is provided to you without charge, and with no warranty. You may give #
# away copies of JOVE, including sources, provided that this notice is #
# included in all the files. #
###########################################################################
# TMPDIR is where the tmp files get stored, usually /tmp or /tmp/jove. If
# your system does not remove subdirectories of /tmp on reboot (lots do
# remove them these days) then it makes sense to make TMPDIR be /tmp/jove.
# But if you want to recover buffers on system crashes, you should create a
# directory that doesn't get cleaned upon reboot, and use that instead.
# You would probably want to clean out that directory periodically with
# /etc/cron.
# RECDIR is the directory in which RECOVER looks for JOVE's tempfiles.
#
# JOVEHOME is the directory in which pieces of JOVE are kept. It is only used
# in the default definitions of SHAREDIR, LIBDIR, BINDIR, and MANDIR.
# SHAREDIR is for online documentation, and the system-wide .joverc file.
# LIBDIR is for the PORTSRV and KBD processes and RECOVER.
# BINDIR is where to put the executables JOVE and TEACHJOVE.
# MANDIR is where the manual pages go for JOVE, RECOVER and TEACHJOVE.
# MANEXT is the extension for the man pages, e.g., jove.1 or jove.l or jove.m.
# DFLTSHELL is the default shell invoked by JOVE and TEACHJOVE.
#
# If they don't exist, this makefile will try to create the directories
# LIBDIR and SHAREDIR. All others must already exist.
CC = c:/gnu/bin/gcc.ttp
SHELL = c:/ash.ttp
TMPDIR = d:\/\/tmp
RECDIR = d:\/\/tmp\/\/preserve
JOVEHOME = c:\/\/jove
SHAREDIR = $(JOVEHOME)\/\/lib
LIBDIR = $(JOVEHOME)\/\/lib
BINDIR = $(JOVEHOME)\/\/bin
MANDIR = $(JOVEHOME)\/\/man\/\/man$(MANEXT)
MANEXT = 1
DFLTSHELL = c:\/\/ash.ttp
PROG = jove
VERSION = 4.14
# These should all just be right if the above ones are.
JOVE = $(BINDIR)\\\\jove.ttp
TEACHJOVE = $(BINDIR)\\\\teachjov.ttp
RECOVER = $(LIBDIR)\\\\recover
PORTSRV = $(LIBDIR)\\\\portsrv
KBD = $(LIBDIR)\\\\kbd
JOVERC = $(SHAREDIR)\\\\jove.rc
CMDS.DOC = $(SHAREDIR)\\\\cmds.doc
TEACH-JOVE = $(SHAREDIR)\\\\teachjove
JOVEM = $(MANDIR)\\\\jove.$(MANEXT)
TEACHJOVEM = $(MANDIR)\\\\teachjov.$(MANEXT)
# Select the right libraries for your system.
# 2.10BSD:LIBS = -ltermcap
# v7: LIBS = -ltermcap
# 4.1BSD: LIBS = -ltermcap -ljobs
# 4.2BSD: LIBS = -ltermcap
# 4.3BSD: LIBS = -ltermcap
# SysV Rel. 2: LIBS = -lcurses
# SCO Xenix: LIBS = -ltermcap -lx
# SCO: LIBS = -lcurses
# AIX on the R6000s: LIBS = -lcurses
# MIPS: LIBS = -ltermcap
LIBS = -ltermcap
# 2.10BSD:LDFLAGS =
# v7: LDFLAGS =
# 4.1BSD: LDFLAGS =
# 4.2BSD: LDFLAGS =
# 4.3BSD: LDFLAGS =
# SysV Rel. 2: LDFLAGS = -Ml
# SCO Xenix: LDFLAGS = -Ml -F 3000
# SCO Unix: LDFLAGS =
#
# SEPFLAG should be:
# not on a PDP-11: SEPFLAG =
# PDP-11 with separate I&D: SEPFLAG = -i
# PDP-11 without separate I&D: SEPFLAG = -n
#
LDFLAGS =
SEPFLAG =
# define a symbol for your OS if it hasn't got one. sysdep.h tries to
# use cpp predefined symbols to decide on the appropriate behaviour
# in most cases. Exceptions are
# Apple A/UX on macIIs SYSDEFS=-DA_UX
# SunOS4.0 SYSDEFS=-DSUNOS4
# MIPS RiscOS4.x -systype bsd43
# SCO Unix SYSDEFS=-DSCO -DSYSV
# IBM RS6000s SYSDEFS=-DAIX -D_BSD -D_BSD_INCLUDES -D_NO_PROTO
# A system V system that doesn't
# define one of SVR2,SVR3,SYSV SYSDEFS=-DSYSV
#
# You can just say 'make SYSDEFS=-Dwhatever' on these systems.
#
SYSDEFS = -DBSD=1 -DMiNT=1
# for SCO Xenix, set
# MEMFLAGS = -Mle
# CFLAGS = -LARGE -O -F 3000 -K -Mle (say -Mle2 for an 80286)
# you will want to add -O here for final cut
CFLAGS = $(SYSDEFS) -O -funsigned-char
# For cross compiling Jove, set CC to the cross compiler, and LOCALCC
# to the local C compiler. LOCALCC will be used for compiling setmaps,
# which is run as part of the compilation to generate the keymaps.
# Set LOCALCFLAGS and LOCALLDFLAGS appropriately too. For Xenix, note
# that LOCALCFLAGS must be set to $(MEMFLAGS)
LOCALCC = $(CC)
LOCALCFLAGS = $(CFLAGS) # $(MEMFLAGS)
LOCALLDFLAGS = $(LDFLAGS)
BASESEG = funcdefs.o keys.o argcount.o ask.o buf.o ctype.o delete.o \
disp.o getch.o insert.o io.o jove.o loadavg.o marks.o misc.o re.o \
screen.o tune.o util.o vars.o version.o list.o keymaps.o
OVLAY1 = abbrev.o rec.o paragraph.o fmt.o
OVLAY2 = c.o wind.o fp.o move.o
OVLAY3 = extend.o macros.o
OVLAY4 = iproc.o re1.o
OVLAY5 = proc.o scandir.o term.o case.o
OBJECTS = $(BASESEG) $(OVLAY1) $(OVLAY2) $(OVLAY3) $(OVLAY4) $(OVLAY5)
C_SRC = funcdefs.c abbrev.c argcount.c ask.c buf.c c.c case.c ctype.c \
delete.c disp.c extend.c fp.c fmt.c insert.c io.c iproc.c \
jove.c list.c loadavg.c macros.c marks.c misc.c move.c paragraph.c \
proc.c re.c re1.c rec.c scandir.c screen.c term.c util.c \
vars.c version.c wind.c getch.c mac.c keymaps.c pcscr.c
SOURCES = $(C_SRC) portsrv.c recover.c setmaps.c teachjove.c kbd.c
HEADERS = argcount.h buf.h chars.h ctype.h dataobj.h disp.h \
externs.h fp.h io.h iproc.h jove.h keymaps.h list.h mac.h \
re.h rec.h scandir.h screen.h sysdep.h temp.h termcap.h \
ttystate.h tune.h util.h vars.h wait.h wind.h
DOCS1 = doc/example.rc doc/jove.1 doc/jove.2 doc/jove.3 \
doc/jove.4 doc/jove.5 doc/jove.nr doc/system.rc \
doc/teach-jove doc/teachjove.nr doc/README doc/jove.qref
DOCS2 = doc/cmds.doc.nr
DOCS3 = doc/joveman doc/cmds.doc doc/manpage
DOCS = $(DOCS1) $(DOCS2)
MISC = Makefile Makefile.dos tune.dos tune.template README Readme.dos \
Readme.mac iproc-pipes.c iproc-ptys.c
SUPPORT = teachjove.c recover.c setmaps.c portsrv.c kbd.c keys.txt \
macvert.c menumaps.txt mjovers.Hqx
BACKUPS = $(HEADERS) $(C_SRC) $(DOCS) $(SUPPORT) $(MISC)
all: sdate xjove recover teachjove portsrv kbd macvert edate
sdate:
@echo "**** make started at this time ****"
edate:
@echo "**** make completed at this time ****"
xjove: $(OBJECTS)
$(CC) $(LDFLAGS) -o xjove $(OBJECTS) $(LIBS)
@-size xjove
gjove: $(OBJECTS)
ld -X /lib/gcrt0.o -o gjove $(OBJECTS) -lc $(LIBS)
@-size gjove
ovjove: $(OBJECTS)
ld $(SEPFLAG) $(LDFLAGS) -X /lib/crt0.o \
-Z $(OVLAY1) \
-Z $(OVLAY2) \
-Z $(OVLAY3) \
-Z $(OVLAY4) \
-Z $(OVLAY5) \
-Y $(BASESEG) \
-o xjove $(LIBS) -lc
@-size xjove
portsrv: portsrv.o
$(CC) $(LDFLAGS) -o portsrv $(SEPFLAG) portsrv.o $(LIBS)
kbd: kbd.o
$(CC) $(LDFLAGS) -o kbd $(SEPFLAG) kbd.o $(LIBS)
recover: rectune.h recover.o tune.o rec.h temp.h
$(CC) $(LDFLAGS) -o recover $(SEPFLAG) recover.o tune.o $(LIBS)
teachjov: teachjov.o
$(CC) $(LDFLAGS) -o teachjove $(SEPFLAG) teachjove.o $(LIBS)
setmaps.ttp: setmaps.o funcdefs.c
$(LOCALCC) $(LOCALLDFLAGS) -o setmaps.ttp setmaps.o
teachjov.o: teachjov.c /usr/include/sys/types.h /usr/include/sys/file.h
$(CC) -c $(CFLAGS) -DTEACHJOVE=\"$(TEACH-JOVE)\" teachjove.c
# don't optimize setmaps.c because it produces bad code in some places
# for some reason
setmaps.o: funcdefs.c keys.txt
$(LOCALCC) $(LOCALCFLAGS) -c setmaps.c
# ignore error messages from setmaps
# it doesn't understand ifdefs
keys.c: setmaps.ttp keys.txt
setmaps.ttp < keys.txt > keys.c
keys.o: keys.c jove.h
tune.c: Makefile tune.template
-rm -f tune.c
@echo "/* Changes should be made in Makefile, not to this file! */" > tune.c
@echo "" >> tune.c
@sed -e 's;TMPDIR;$(TMPDIR);' \
-e 's;LIBDIR;$(LIBDIR);' \
-e 's;SHAREDIR;$(SHAREDIR);' \
-e 's;BINDIR;$(BINDIR);' \
-e 's;SHELL;$(DFLTSHELL);' tune.template >> tune.c
rectune.h: Makefile
-rm -f nrectune.h
@echo "/* Changes should be made in Makefile, not to this file! */" > nrectune.h
@echo "" >> nrectune.h
@echo \#define TMP_DIR \"$(TMPDIR)\" >> nrectune.h
@echo \#define REC_DIR \"$(RECDIR)\" >> nrectune.h
-cmp -s nrectune.h rectune.h || (rm -f rectune.h; cp nrectune.h rectune.h)
iproc.o: iproc-ptys.c iproc-pipes.c iproc.c
$(CC) -c $(CFLAGS) iproc.c
macvert: macvert.c
$(CC) $(CFLAGS) -o macvert macvert.c
touch:
touch $(OBJECTS)
clean:
rm -f a.out core *.o keys.c tune.c xjove portsrv kbd recover setmaps.ttp \
teachjove macvert nrectune.h rectune.h \#* *~ make.lo